<%@page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/tagDeclare.jsp"%>
<%@include file="/headDeclare.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>福建青年墙体资源管理系统</title>
	<script type="text/javascript">
		var tab = null;
		var accordion = null;
		var tree = null;
		var flag = false;

		$(function () {
			//布局 , isLeftCollapse : true
			$("#layout1").ligerLayout({ leftWidth:150, height:'100%', space:4, onHeightChanged:f_heightChanged  });

			var height = $(".l-layout-center").height();

			//Tab
			$("#framecenter").ligerTab({ height:height });

			//面板
			$("#accordion1").ligerAccordion({ height:height-24});

			$(".l-link").hover(function () {
					$(this).addClass("l-link-over");
				}, function () {
					$(this).removeClass("l-link-over");
			});

			tab = $("#framecenter").ligerGetTabManager();
			accordion = $("#accordion1").ligerGetAccordionManager();
			tree = $("#tree1").ligerGetTreeManager();
			$("#pageloading").hide();
			$("#framecenter").ligerTab({onBeforeRemoveTabItem:function(tabid){ 
				var obj = window.frames[tabid];
				if(obj.timework == 'undifined' || typeof obj.timework != 'number') return;
				window.frames[tabid].clearTimeout(obj.timework);
			}});
			if(!flag) tick();
 			$("#home").attr("src","home.do");
		});

		function f_heightChanged(options) {
			if (tab)
				tab.addHeight(options.diff);
			if (accordion && options.middleHeight - 24 > 0)
				accordion.setHeight(options.middleHeight - 24);
		}
        
		function f_addTab(tabid, text, url) { 
			tab.addTabItem({ tabid:tabid, text:text, url: url });
		}
		
		function logout(){
			tab.removeAll();
			location.href = "logout.do";
		}
		
		function showLocale(objD)
		{
			var str,colorhead,colorfoot;
			var yy = objD.getYear();
			if(yy<1900) yy = yy+1900;
			var MM = objD.getMonth()+1;
			if(MM<10) MM = '0' + MM;
			var dd = objD.getDate();
			if(dd<10) dd = '0' + dd;
			var hh = objD.getHours();
			if(hh<10) hh = '0' + hh;
			var mm = objD.getMinutes();
			if(mm<10) mm = '0' + mm;
			var ss = objD.getSeconds();
			if(ss<10) ss = '0' + ss;
			var ww = objD.getDay();
			if  ( ww==0 )  colorhead="<font >";
			if  ( ww > 0 && ww < 6 )  colorhead="<font >";
			if  ( ww==6 )  colorhead="<font >";
			if  (ww==0)  ww="星期日";
			if  (ww==1)  ww="星期一";
			if  (ww==2)  ww="星期二";
			if  (ww==3)  ww="星期三";
			if  (ww==4)  ww="星期四";
			if  (ww==5)  ww="星期五";
			if  (ww==6)  ww="星期六";
			colorfoot="</font>";
			str = colorhead + yy + "-" + MM + "-" + dd + " " + hh + ":" + mm + ":" + ss + "  " + ww + colorfoot;
			return(str);
		}
		function tick()
		{
			flag = true;
			var today;
			today = new Date();
			document.getElementById("localtime").innerHTML = showLocale(today);
			window.setTimeout("tick()", 1000);
		}
		function updatePwd(){
			$.ligerDialog.open({ url: 'updatePwd.do', height: 300, width: 400, 
				buttons: [
       	            { text: '确定', onclick: function (item, dialog) {
       	            	dialog.frame.$("form:first").submit();
       	            },cls:'l-dialog-btn-highlight' },
       	            { text: '取消', onclick: function (item, dialog) { dialog.close(); } }
       	         ], isResize: true,title:'密码修改'
       	        });
		}
	</script>

	<style type="text/css"> 
		body,html{height:100%;}
		body{ padding:0; margin:0; overflow:hidden;} 
		#pageloading{position:absolute; left:0px; top:0px; background:white url('images/loading.gif') no-repeat center; width:100%; height:100%;z-index:99999;}
    	.l-topmenu{ margin:0; padding:0; height:31px; line-height:31px; background:url('js/ligerUI/images/top.jpg') repeat-x bottom; position:relative; border-top:1px solid #1D438B;}
		.l-topmenu-logo{ color:#E7E7E7; padding-left:35px; line-height:26px; background:url('js/ligerUI/images/topicon1.gif') no-repeat 10px 5px;}
		.l-topmenu-welcome{ position:absolute; height:24px; line-height:24px; right:30px; top:2px;color:#070A0C;}
    	.l-topmenu-welcome a{ color:#E7E7E7; text-decoration:underline} 
		.space{ color:#E7E7E7;}
		.l-link2{text-decoration:underline; color:white; margin-left:2px;margin-right:2px;}
		.l-link{ display:block; line-height:22px; height:22px; padding-left:8px; border:1px solid white; margin:4px; color: #333333;}
    	.l-link-over{ background:#FFEEAC; border:1px solid #DB9F00;} 
	</style>
</head>

<body style="padding:0px;background:#EAEEF5;" >
	<div id="pageloading"></div>
	<input type="hidden" id="info" value="${info }" />
	<div id="topmenu" class="l-topmenu">
		<div class="l-topmenu-logo">福建青年墙体资源管理系统</div>
	    <div class="l-topmenu-welcome">
	    	<jt:check rightMark="mapManage">
	    		<span class="space"><a href="javascript:f_addTab('map','地图演示','map.do')">地图</a></span>
		    	<span class="space">|</span>
	    	</jt:check>
	    	<span class="space">系统时间:</span>
			<span class="space" id = "localtime"></span> 
			<span class="space">|</span>
	    	<span class="space">账号:<c:out value="${username_attr.userName }" default="游客" /></span>
			<span class="space">|</span>
			<jt:check rightMark="pwdUpdate">
				<span class="space"><a href="javascript:updatePwd()">修改密码</a></span><span class="space">|</span>
			</jt:check>
			<c:if test="${empty username_attr}"><span class="space"><a href="login.do">登录</a></span></c:if>
			<c:if test="${not empty username_attr}"><span class="space"><a href="javascript:logout();">退出</a></span></c:if>
	    </div> 
	</div>

	<div id="layout1" style="width:99.2%; margin:0 auto; margin-top:4px; "> 
		<div position="left"  title="系统菜单" id="accordion1"> 
			<div title="资源管理" class="l-scroll">
				<jt:check rightMark="wallManage">
					<a class="l-link" href="javascript:f_addTab('wallMgr','墙体管理','wall/list.do')">墙体管理</a>
				</jt:check>
				<jt:check rightMark="imageBatchUpload">
	                <a class="l-link" href="javascript:f_addTab('batchUploadImage','图片上传','enterBatchUpload.do')">图片上传</a>
				</jt:check>
				<!-- <a class="l-link" href="javascript:f_addTab('imageMgr','图片管理','image/list.do')">图片管理</a> -->
			</div>
			
			<div title="系统管理" class="l-scroll">
<!-- 				<a class="l-link" href="javascript:f_addTab('imageMgr','图片管理','image/list.do')">图片管理</a> -->
				<jt:check rightMark="userManage">
					<a class="l-link" href="javascript:f_addTab('userMgr','用户管理','user/list.do')">用户管理</a>
				</jt:check>
				<jt:check rightMark="roleManage">
					<a class="l-link" href="javascript:f_addTab('roleMgr','角色管理','role/list.do')">角色管理</a>
				</jt:check>
				<jt:check rightMark="rightManage">
					<a class="l-link" href="javascript:f_addTab('rightMgr','权限管理','right/rightframe.do')">权限管理</a>
				</jt:check>
				<jt:check rightMark="tradeManage">
					<a class="l-link" href="javascript:f_addTab('tradeMgr','行业管理','item/list.do?groupName=trade')">行业管理</a>
				</jt:check>
<%-- 				<jt:check rightMark="systemMonitor"> --%>
<!-- 					<a class="l-link" href="javascript:f_addTab('systemMonitor','系统监控','system/monitor.do')">系统监控</a> -->
<%-- 				</jt:check> --%>
<%-- 				<jt:check rightMark="dbbackup"> --%>
<!-- 					<a class="l-link" href="javascript:f_addTab('dbbackup','数据备份','system/backup.do')">数据备份</a> -->
<%-- 				</jt:check> --%>
			</div>
<!-- 			<div title="网站管理" class="l-scroll"> -->
<%-- 				<jt:check rightMark="topManage"> --%>
<!-- 					<a class="l-link" href="javascript:f_addTab('top','首页','web/top/list.do')">首页</a> -->
<%-- 				</jt:check> --%>
<%-- 				<jt:check rightMark="workManage"> --%>
<!-- 					<a class="l-link" href="javascript:f_addTab('work','案例','web/work/list.do')">案例</a> -->
<%-- 				</jt:check> --%>
<%-- 				<jt:check rightMark="serviceManage"> --%>
<!-- 	                <a class="l-link" href="javascript:f_addTab('service','服务','web/service/list.do')">服务</a> -->
<%-- 	            </jt:check> --%>
<%-- 	            <jt:check rightMark="aboutManage"> --%>
<!-- 	                <a class="l-link" href="javascript:f_addTab('about','关于','web/about/list.do')">关于我们</a> -->
<%-- 	            </jt:check> --%>
<%-- 	            <jt:check rightMark="teamManage"> --%>
<!-- 	                <a class="l-link" href="javascript:f_addTab('team','团队','web/team/list.do')">团队</a> -->
<%-- 	            </jt:check> --%>
<%-- 	            <jt:check rightMark="contactManage"> --%>
<!-- 	                <a class="l-link" href="javascript:f_addTab('contact','联系我们','web/contact/list.do')">联系我们</a> -->
<%--                 </jt:check> --%>
<!-- 			</div> -->
		</div>
		<div position="center" id="framecenter"> 
			<div tabid="home" title="欢迎页面" style="height:300px" >
				<iframe frameborder="0" name="home" id="home" ></iframe>
			</div> 
		</div>
	</div>
	<div style="display:none"></div>
</body>
</html>
